import { createAPI } from '@/utils/request'
// 获取文章数据接口
export const list = data => createAPI('/articles', 'get', data)
// 删除数据的接口（传入id）
export const deletedData = data => createAPI(`/articles/${data.id}`, 'delete', data)
// 更改状态(id state)
export const changeState = data => createAPI(`/articles/${data.id}/${data.state}`, 'POST', data)
// 添加文章
export const addlist = data => createAPI('/articles', 'post', data)
// 文章修改
export const modifyID = data => createAPI(`/articles/${data.id}`, 'put', data)
